package com.ricky04.command;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.util.Arrays;

/**
 * 容器启动完毕
 */
@Component
@Order(1)
//数字越小越先执行
public class MyApplicationLiner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println(Arrays.asList(args.getSourceArgs()));
    }
}
